export default {
    data() {
        return {
            role: 1,
        }
    },
    onLoad() {
        this.role = this.$store.state.role;
    },
    methods: {

        // 切换为消费者
        toCustomer: function() {
            this.$store.state.role = 1;
            uni.reLaunch({
                url: '/pages/index/index'
            });
        },

        // 切换为上货员
        toManage: function() {
            this.$store.state.role = 2;
            uni.reLaunch({
                url: '/pages/indexManage/indexManage'
            });
        }
    }
}